package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.app.util.UserContext;
import cn.wolfcode.trip.base.domain.ShowBean;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.FriendTravelShareQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IFriendsTravelShareService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 关注分享页面控制器
 *
 * @author Wangyk
 * @date 2019/1/14 20:04
 */
@RestController
@RequestMapping("friendsTravelShares")
public class FriendsTravelShareController {
    @Autowired
    private IFriendsTravelShareService friendsTravelShareService;

    /**
     * 查询当前用户的朋友圈分享
     *
     * @return 分享列表
     */
    @GetMapping
    public Object getFriendsTravelSharesBuCurrentUserId(FriendTravelShareQueryObject qo) {
        //1:查询当前用户的朋友圈分享
        PageInfo pageInfo = friendsTravelShareService.getCurrentUserzFriendsTravelShare(qo,
                UserContext.getCurrentUser());

        return pageInfo;
    }

}
